package com.etc.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.etc.dao.ScenicMapper;
import com.etc.entity.Scenic;
import com.etc.entity.Scenic.Location;
import com.etc.service.ScenicService;

@Service
public class ScenicServiceImpl implements ScenicService {
	@Resource
	private ScenicMapper sm;

	@Override
	@Transactional
	public boolean insertScenic(Scenic scenic) {
		insertLocation(scenic);
		return sm.insertScenic(scenic) > 0;
	}

	@Override
	public boolean insertLocation(Scenic scenic) {
		return sm.insertLocation(scenic) > 0;
	}
}
